Conventionally, a technique for correcting the brightness of a dark portion of an object in an image by applying a virtual light effect to the object is known (Japanese Patent Laid-Open No. 2010-135996). This makes it possible for the shading of the object generated by environment light to be adjusted after shooting.
Shading of an object depends on the three-dimensional shape of the object and the direction of the light illuminating the object. Moreover, the direction of the light illuminating the object depends on the relative positional relation between a virtual light source and the object. Therefore, in re-lighting processing for correcting the shading of the object using virtual light, it is necessary to appropriately determine the position of the virtual light source. However, in the technique described in Japanese Patent Laid-Open No. 2010-135996, the object is illuminated in an opposite direction to the environment light for the purpose of reducing the shade of the object, and therefore adjustment of the shading that can be realized with the re-lighting processing is restricted.